From fc90bd5e302f0146ee7fa4cdcaf06b6ffef41e7c Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 14 Feb 2016 09:29:55 -0500 Subject: [PATCH] gtk-demo: Fix the size saving for CSD We need to use gtk_window_get_size to get the correct size that we can pass to gtk_window_set_default_size regardless of CSD or not. --- demos/gtk-demo/application.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/demos/gtk-demo/application.c b/demos/gtk-demo/application.c index 195eb611f0..c85102d46c 100644 --- a/demos/gtk-demo/application.c +++ b/demos/gtk-demo/application.c @@ -487,10 +487,7 @@ demo_application_window_size_allocate (GtkWidget *widget, GTK_WIDGET_CLASS (demo_application_window_parent_class)->size_allocate (widget, allocation); if (!window->maximized && !window->fullscreen) - { - window->width = allocation->width; - window->height = allocation->height; - } + gtk_window_get_size (GTK_WINDOW (window), &window->width, &window->height); } static gboolean -- 2.30.2